package ifmo.compiler.task21.parser.symbols;

public class OperationSymbol extends Symbol {
	private int _shift;
	private String _lexval;
	
	public OperationSymbol(){
		super(SymbolType.Operation);
	}
	
	public OperationSymbol(String value) {
		super(value, SymbolType.Operation);
	}

	public int getShift()
	{
		return _shift;
	}
	
	public void setShift(int val)
	{
		_shift = val;
	}
	
	static public OperationSymbol getOperatorSymbol()
	{
		OperationSymbol oper = new OperationSymbol();
		oper.setShift(2);
		
		oper.setValue("{OperationOperator}");
		
		return oper;
	}

	static public OperationSymbol getIdSymbol()
	{
		OperationSymbol oper = new OperationSymbol();
		oper.setShift(1);
		
		oper.setValue("{OperationID}");
		return oper;
	}
	
	public String getLexval()
	{
		return _lexval;
	}
	
	public void setLexval(String value)
	{
		_lexval = value;
	}
}
